home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / games / stello11.lzh / DOC / STELLO.TXT < prev    next >
Text File  |  1994-07-04  |  24KB  |  482 lines

  1. Hello everybody.
  2.  
  3. Here  is version 1.10 of my Othello/Reversi game Stello  (ST-Othello  or 
  4. Super-Othello or whatever you like best).
  5.  
  6. Files:
  7.   README            (short description of stello)
  8.   STELLO.PRG        (Othello for 68000)
  9.   STELLO30.PRG      (Othello for 68030)
  10.   STEENG.RSC        (english rsc.)
  11.   STEGER.GER        (german rsc.)
  12.   STEDAN.RSC        (danish rsc.)
  13.   BLACK.LIB         (black opening lib)
  14.   WHITE.LIB         (white opening lib)
  15.   DISCS\*.BIN       (different discs)
  16.   BOARD\COL2\*.IMG  (pictures for 2 colors)
  17.   BOARD\COL4\*.IMG  (pictures for 4 colors)
  18.   BOARD\COL16\*.IMG (pictures for 16 colors)
  19.   DOC\REGISTER.TXT  (Send this to me please)
  20.   DOC\STELLO.TXT    (you are reading it)
  21.   DOC\WHATSNEW      (what is new in this version)
  22.   GAM\BADPOS.GAM    (set response time to infinity and wait)
  23.   GAM\PLY22.GAM                      do
  24.   GAM\END.GAM                        do
  25.   GAM\WOW64.GAM                      do
  26.  
  27. History:
  28.   5 years ago.
  29.  
  30.   Beeing very interested in game theory,  and the game of Othello, i had 
  31.   (in   vain)  for  a  long  time  searched  for  a  good   and   strong 
  32.   implementation  of  this  game  for  the  Atari  computer  line.   Not 
  33.   succeding i said to myself,  why not write one myself. Had i known how 
  34.   difficult  and  timeconsuming it would be,  i would probably  not  had 
  35.   started.  Anyway i bought a book called advanced Pascal in which there 
  36.   was a tiny othello game.  It was quickly adopted to my atari computer, 
  37.   and  of cause then i played some matches against it.  What a  bommer!! 
  38.   It  played so bad that i could not belive it.  Looking at  the  source 
  39.   code i had to admit that i really didn't understand what was going on. 
  40.   I needed to learn about the fundamentals before i could make a  better 
  41.   program.  I then began to study the theory behind game  playing,  such 
  42.   as  the  alfa/beta minimax algorithm and many other  related  objects. 
  43.   During the next two years i developed the fundamental algorithms,  and 
  44.   implemented  it  in  Pascal,  and where it was  needed  for  speed  in 
  45.   assembler.  Writing in Prospero Pascal was not anything i would  whish 
  46.   for  my worst enemies.  After two years of work (in my spare  time)  i 
  47.   had  a  working version of a Othello game which had  a  primitive  Gem 
  48.   interface.  The searching algorithms were quite good,  but the "brain" 
  49.   was  not working so good.  Once in a while it would loose  control  of 
  50.   the  game due to something that i didn't quite  understand.  You  must 
  51.   understand,  that while i tried to make my program better,  i also had 
  52.   to  develop my own understanding of the game.  I can clearly say  that 
  53.   it had made me a much better Othello player to write this program.  In 
  54.   these  two  years  i concentrated on learning the  theory  behind  the 
  55.   searching  algoritmes  and the different techniques  to  optimize  the 
  56.   minimax algorithme.  (There is still room for improvement, for example 
  57.   it  was  just  during the last three months  that  i  implemented  the 
  58.   zerowidth  modifikation to minimax,  and i still need  to  investigate 
  59.   the hash table techniques).  What i needed was a better  understanding 
  60.   of the game itself.  Something then happend which were the major force 
  61.   behind  the increase in playing strength during the last three  years. 
  62.   I  read an article of Paul Rosenblaum who had made a  Othello  program 
  63.   of  remarkable strength.  In this article he made a very good  analyse 
  64.   of  the  game itself,  and made some suggestions about  the  ways  one 
  65.   could  implement  a  evaluation function which  could  understand  the 
  66.   features  of the game.  After studing his article i began  implmenting 
  67.   his  ideas  and  improving upon them.  Eureka,  my  program  got  much 
  68.   stronger.  Programming in pascal was not fun any more,  so i  switched 
  69.   to  Turbo  C,  and later to Pure C.  What a joy programming  now  was, 
  70.   compiling  the  program  was  now a  matter  of  seconds  compared  to 
  71.   minutes.  The  last two years whent by,  and i improved the  interface 
  72.   beyond  recognation  and  optimized  the shit  out  of  the  searching 
  73.   algorithms.  The brain got a facelift,  which means that i implemented 
  74.   some  ideas  of  my  own,  that made a much  stronger  player  of  the 
  75.   program.  I  did  this  by making the  program  avoid  the  inherently 
  76.   unstable evaluations which most othello programs do,  and that  really 
  77.   made  it come up amongst the best programs in the world.  So now  here 
  78.   it  is.  After  five  years  of  development  i  will  release  it  as 
  79.   Shareware.  i  really hope thet you will enyoy it,  and that you  will 
  80.   gratify a hardworking programmer with his modest shareware fee.
  81.  
  82. Tecnicals:
  83.  
  84.   The  search  is based on the alfa/beta - minimax  algorithm.  It  uses 
  85.   several   heuristics  to  improve  the  search   strategi.   Iterative 
  86.   deepening,  response  killer table,  saving the game tree  (all  moves 
  87.   are saved, as long as there is memory, the program reserves all memery 
  88.   except 10%,  so if you have 4 megabyte it could take 3.6 megabyte  for 
  89.   the  tree  of  moves alone) and sorting  the  moves  dynamically  when 
  90.   everything  else fails.  This reduces the brancing factor  to  between 
  91.   3.0  to 4.5.  It really depends on the position.  In the end game  the 
  92.   banching factor is between 1.8 to 2.4.
  93.  
  94.   The  evaluation is based on several independent  components,  such  as 
  95.   mobility,  stability and corner and edge disks. The program is capable 
  96.   of  solving  most  endgame positions when there is  only  16-14  moves 
  97.   left  (depending  on  computer and position,  some  positions  can  be 
  98.   solved  when  20 moves are missing).  It does so by using  the  highly 
  99.   optimized  search algoritms,  which in the end game is  improved  with 
  100.   the  recursive  zerowidth alfa/beta-minimax algorithm.  On  a  TT  the 
  101.   endgame  routine searches the game tree,  with 15000-20000 nodes  per. 
  102.   second.  A  TT has a clock of 32 MH.  A instruction neads at  least  2 
  103.   clock  cycles  to  complete.   This  gives  32000000/(20000*2)  =  800 
  104.   instructions  per  node.  For every node the program has to  sort  the 
  105.   moves,  make at least one move and evaluate the move. Then call itself 
  106.   recursively to do so for the rest of the nodes.  Doing so in just  800 
  107.   instructions  is,  in my own opinion,  rather good.  The speed of  the 
  108.   normal  search  is  1500-4500 nodes pr  second.  You  can  not  really 
  109.   compare  this  with other programs,  as it depends on  the  evaluation 
  110.   function.  My evaluation function, dosen't just evaluate one node, but 
  111.   investigates  the  possible responds and counterresponds  to  be  sure 
  112.   that  the position is approximately stable,  wich really improves  the 
  113.   playing strenght..
  114.  
  115. Playing strength:
  116.  
  117.   To test how strong my program was,  i made a little testmatch  against 
  118.   the program Thor.  Thor is one of the best Othollo playing programs in 
  119.   the  world,  having  participated in several  turnements,  and  usally 
  120.   ending  amongst  the top programs.  I made the two  programs  play  10 
  121.   different positions against each other,  as both black and white. This 
  122.   is 20 games in all.  The play level was turnement,  which means 30 min 
  123.   for  one game.  The results follow.   
  124.    
  125.              Stello        Thor         Thor         Stello
  126.            | Black  | p |  White | p |  Black | p |  White | p |
  127.   ---------------------------------------------------------------
  128.   game  1. |   41   | 1 |   23   | 0 |   44   | 1 |   20   | 0 |
  129.   game  2. |   30   | 0 |   33   | 1 |    7   | 0 |   57   | 1 |
  130.   game  3. |   54   | 1 |   10   | 0 |   14   | 0 |   50   | 1 |
  131.   game  4. |   53   | 1 |   11   | 0 |   15   | 0 |   49   | 1 |
  132.   game  5. |   58   | 1 |    6   | 0 |   27   | 0 |   37   | 1 |
  133.   game  6. |   22   | 0 |   42   | 1 |   19   | 0 |   45   | 1 |
  134.   game  7. |   38   | 1 |   26   | 0 |   19   | 0 |   45   | 1 |
  135.   game  8. |   25   | 0 |   39   | 1 |   23   | 0 |   41   | 1 |
  136.   game  9. |   29   | 0 |